Minor update to query extract