got some monkey patching code for fixing coverage so that it works with gevent