Fixed bug regarding setting the goal.