minor bugfix in url function