Fix bug on exit
Merge pull request #17 from CristianCantoro/master

Fix bug on exit