fix bug with not sorted mapping between config and model keys