Fix the goal detection.