fixed bug caused by new API-Connectivity detection