         case MAXM1:
             if (!maxms_awake) break;
 
-            scheduler.timer(MAXM1, maxm1_cycle * 10);
-            scheduler.timer(MAXM2, maxm2_offset * 10);
+            scheduler.timer(MAXM1, (word) (maxm1_cycle * 10));
+            scheduler.timer(MAXM2, (word) (maxm2_offset * 10));
             doFlash(ledPort, led1, 1);
             maxmRun(maxm1);
             // maxm1.send();

//    wake time of the next period.
// 3. This implies that the periods cannot overlap.
Wakeperiod wps[] = {
    {1, hm2min(19, 59), hm2min(20, 18)},
    {1, hm2min(21, 31), hm2min(21, 32)},
    {1, hm2min(21, 34), hm2min(21, 36)},
    {1, hm2min(21, 39), hm2min(21, 42)},
    {1, hm2min(22, 17), hm2min(22, 20)},
    {1, hm2min(22, 22), hm2min(22, 24)},
    {2, hm2min(6, 40), hm2min(6, 58)},
    {2, hm2min(7, 40), hm2min(8, 3)},
    {2, hm2min(11, 40), hm2min(19, 59)},
};
byte num_wps = sizeof(wps) / sizeof(wps[0]);


// Uncomment for LEDs flashing for debug
#define DEBUG_FLASH
// Uncomment for debug traces on the serial line
// #define DEBUG_TRACE 

#include <JeeLib.h>
#include <Wire.h> // needed to avoid a linker error :(
