Fixed memory handling.