Fixes #421
Fixes #395
Merge branch 'master' of github.com:robbiehanson/XMPPFramework