Code to fix bug in old memory