added alternative resolve function, if standard path-resolving fails