Some bugfixes to movement