fixed subtle bug in cumulative_mode when there's an exception