All compile errors for goal detection eliminated.