Fix parsing of the main memory.