fix querying the url by given code