Avoid disconnect cycle
Merge pull request #57 from cowboy129/master

Avoid disconnect cycle