fix mem bug
Merge pull request #6 from soloman817/master

fix mem bug