fixed bug in logreg optimizer wrt returning gradient