fix a bug when auth is provided