Fix Gaussian calculation and restore constants