Fix onBadCredentials event.