fixes bug in path resolution/recursion