BLE : fix null pointer exception in main activity