added thread canceling from bluetoothchatservice code