fix wrong sum