Bug fixes to movement