fix bugs in path resolver