stdin fixes
Merge branch 'rewrite' of https://github.com/togglename/togglename into rewrite