Fix sum bugs.