fixed bug with timer init