Fixed memory leak
Merge pull request #7 from xuan/master

Fixed memory leak