Fixes for pathfinding