Fix the query plot feature