fixed url handling bug