improved numerical stability for AdaGrad