Added error handling for compression over the internet on slow
connections, fixed some unit tests