improve treatment of path