Fixed improperly initialized sum