more failsafe method to determine current URL
more failsafe method to determine current URL