fix uninitialized sum to compile without warnings