Fixing compare solution with debug messages