Fixed some bugs regarding Dataprovider