Fixed the snapping-to-goal bug.