fix GCM bug: first time get GCM is "null"