Fixed bug when toggling bluetooth on/off.