Problem with ber_flatten2