checkObstacle fixed