many fixes for classification