             if (actionno == GET_MEMBER(action_iterator, action_t, actionno)) {
                 linked_list_t * actionspec_iterator = GET_MEMBER(action_iterator, action_t, actionspecs);
                 while (actionspec_iterator != NULL) {
-                    prepare_action(alarm, GET_ITEM(actionspec_iterator, actionspec_t), false);
+                    prepare_action(alarm->alarmno, alarm->timestamp, GET_ITEM(actionspec_iterator, actionspec_t), false);
                     NEXT(actionspec_iterator);
                 }
             }

    return NULL;
}

static inline void prepare_action(alarm_t * alarm, actionspec_t * actionspec, bool invert) {
    time_t action_timestamp = alarm->timestamp + actionspec->offset;

    if (invert)
        action_timestamp += actionspec->timeout;

        NEXT(iterator);
    }
    action_time_t * action_time = MALLOC_TYPE(action_time_t);
    action_time->alarmno = alarmno;
    action_time->timestamp = action_timestamp;
    action_time->actions = actionspec->actions;
    action_time->actions.flags.inverted = invert;
