Fix the memory crash.