Added pathfinding fail condition