Fixed crash with pathfind