fix detect goal