Graceful disconnect. Fixed #34