change: number of arguments of toFlat function has changed.