Fix stack trace on disconnect and update examples
Merge pull request #43 from hybridgroup/fixes

Fix stack trace on disconnect and update examples