fix dataset count mismatch bug fix