Small improvement on the query.