Moved close connection
Merge pull request #267 from Lerogero/master

Moved close connection