fixed all pathfinding bugs, still needs testing