Fixed a few pathfinding issues