Slight bug fix to unit pathfinding