Removed the accidental global variable usage on memo array