memory management corrections