fix timer memory leak