improve WMURL.resolve