Fix a nasty typo bug in the timer scheduling code