Correction of memory management errors