fixed some bugs with threads and concurrency in web requests