fix memory readout