prevent a mismatch of localSize and globalSize