fixes to cumsumi, maxs, annotations