Fixed issue with waiting dialog appearing even when no connection has been made