Minor updates

I had several crashes (dead locks) when using proxies (50+ servers) because sometimes multiple threads wanted to remove the same proxy from the list. Please review and merge if you liked the modifications.