fix buffer problem in PMEMimic