Bluetooth: Fix the potential crash issue