Update to get the correct current URL for open() method