Fix pathfinding