Possible fix to computePathToGraph