Fix accidental dialog closing with timer on buttons