fix for complicated empty array conditionals