Fixed small bug in direction.