bug fix of path encoding