Make sure to disconnect the adapter in the destructor