fix gcm batching