Correcting terminating expression for memory disambiguation.