Fixed bug where a  empty sum could be created.