Fixes #7 stdout on exit