gevent checking and various corrections