fixed one minor numeric instability problem for the cross entropy loss