fix bug in creating classifier