Fix clear goals and add new goal bug.