further fix to getURL logic