Some fixes to classifier