Stops when goal is found.