some fixes to multinomial classifier