fixed error at increment: reset sum