Fixed potentiel bug if an URL object is returned