fix problem of replaceRelativePath