Fix bug in XTrain(select)