fix svm bugs