fix empty array for valid query