         WebServer.listener();
       }
     } else { // Device not connected to WiFi. Reestablish connection
-      Network.connect();
+      Network.listener();
     }
   } else { // Access Point Mode
     Network.APListener();

    Mqtt.begin();
  }

  Network.connect();

  /* Initializing HTTP WebServer */
  WebServer.handle("/", handleHTTPRequests);

  Led.begin(0);

  /* If device in configuration mode then start LED blinking */
  if (Device.getMode() == MODE_ACCESS_POINT) {
    Led.blinkingOn(100);
  }

