Added flatten.