fix crash in case of auth error