model::toArray fix