Fixing issue with getting current URL