change a little for simplifyPath.cpp.