Modified pathfinding slightly