Fixed bug in the accumulate function