bug fixes in SVM