Fix for incorrect number of trailing zeros in addition algorithm