bugfix: able to die because of switching directions too quickly