Fix pathfinding crash, pathfinding is still broken though