Fix BLE crash issue when IoTivity Stop is called.