Fixed minor bug in pathfind