Fix async dns lookup bug