fix timer checking logic