Fix an error with the batch query so it is usable as a requirement for other tasks