Fix return of set_alarm function