Fix to disconnect method