fix Error for sum != 1.0