Fix order of PATH resolving