Fix timer shutdown procedure.