fix memory.