fix error if @url_hash is passed + url_hash refactoring