mod: prevent errors on flatten()