fix the crashing bug when bluetooth is not turned on in the begining