more robust url handling again