fix regression caused by refactoring get_path