Fixing memory graphs