Bug correction of the timer init function