Handle nested array properly