Fixed sum not being initialized