Bugfix in pathfield cost evaluation