Issue #8 Issue #10 Issue #11 Issue #14 fix. No gracefull shutdown yet