ML bug fix for non-hinge loss