query & task service fixes