Fixed datasource bugs