fix datasource bugs