Merge pull request #582 from skpcharles/master

more changes on connection not close issue
more changes on connection related issue