slow query graph, misc bugs