Fixed infinite loop when goal was reached