Fix missing increment in madd function.