fixes, improved pathfinding polygon generation