Fixed a memory bug.