fix bug in data provider factory