major fix on memory stats