Fixed overwrite of timer variable