fix bug on timer