Changed some stuff in pathfinding