fixed JS crash in event/timer.js due to human coding error.