         }
         nextSleep = ONE_HOU_TIME + 137000000;
       }
-      if (rtcStore[2] >= 59) {
+      if (rtcStore[2] >= 60) {
         rtcStore[1] = STATE_HOUSKEEPING;
         system_rtc_mem_write(RTC_BASE, rtcStore, 3);
         nextSleep = 100;

    rtcStore[2] = 0;
    system_rtc_mem_write(RTC_BASE, rtcStore, 3);
    rtcEndTime = 0;
  }

  switch (rtcStore[1]) {

    case STATE_SLEEP_WAKE:
      if (rtcStore[2] < 48) {
        doWork();
        nextSleep = nextSleep + 24000000;

      } else {
        if (connectToInternet()) {
