fixed the thread safety problem in nettools