fix moving in debug mode