fix gcm reg bug