Re-fix array length issues