Fix bug: can not get RegistrationID for the first time