Respect array length when parsing