fix sum error