Fixed bug in character movement.