fix thread safe for dns