fix sum issue