Fix bugs with Timer and DNS impl.