fixed a bug for features.train()
