Resolved error when disconnecting adapter