fix bug for the train data set