Fixed state errors.
Fixed bugs, but Pacman is not very smart.