fixed sum bug