compact(): Undefined variable: guess