Repaired directionTo bug