fixed bug when pathString undefined