fix bug when url is None