Fixed bug where wrong url is selected.