Fixed new query to fit old return format