added fix to direction flipping; direction doesn't pop back facing right all the time