fix sum binding bugs