fix timer not always reset