More fixes to hanging query in cherrypy compat