Adding flatten