added bad network handling for requests
made event loops close properly