fix handling of arrays in embedded mode