Fixed a race condition where the progressBar was set to invisible too
fast because of an already running BT device scan being cancelled