Fix resource leak
Merge pull request #73 from takahi-i/fix-leak

Fix resource leak