move set_url to __init__. fixes #672