Fix the fatal bug in string memory stats.