improve curl thread-safety, again