Added checking internet connection and data updating after changing connection status.