gaussian numerical problems fix