Fix query error on task