fix dns query bugs