fixed hanging issues on Disconnect