fixed log loss to have maxError