Fixed issue with the bluetooth sockets not being torn down properly