fix inference of svm