fixes to cumsumi for small values