Fix exit
Merge pull request #1141 from mattn/fix_exit

Fix exit