fix #2096: crash on startup on GCM register

fix #2096: crash on startup on GCM register