Bug fix in svm