Fix bug in specification of movement direction.