fixed connection handler
Merge pull request #181 from zelgerj/master

fixed connection handler