Fixed issue with disconnecting