overlapping polygon pathfinding bug fix