Fixed freed memory accessing bug.
(Issue #32)
Merge pull request #34 from redboltz/fix_freed_mem_access

Fixed freed memory accessing bug.