wrap the query as a workaround