More fixes to memory