remove unnecessary pathlen