fix close function
Merge pull request #6 from monteslu/master

fix close function