Fix run queries