Fixed deficit sum overflow bug