MAJOR FIX: Added API-Connectivity detection