fixed bug in automatic SVM training