fix disconnect method