fix bugs for handling item `path`