Changes code so that the first alarm() event always complete