Fixed the problem that crashed the program if the bluetooth on MCU was
off.