fixed flatten to omit the nested collection property