fix MANY bugs with timer