Some bugfix.

Fixed Halt bug, Now saves last direction.