Fix Bluetooth adapter error

When the user clicks off bluetooth module during device search program
throw error.