Resolved the double-free problem
Merge pull request #44 from Coeuvre/master

Resolved the double-free problem