Fixed bug in path_walk at pathr. at exit of loop.