Fix checking credentials.