respect flatten array property

Simple fix to respect the flatten array property passed in.