Fixes an issue with bool calculation, and adds the non-indirection version of sum