pathname bug fix