fix rootpath_length