Added flatten_acc completion clause