This has already been answered multiple times, please see this question for example: Sum of Variable not equal to sum of its data
This has already been answered multiple times, please see this question for example: Sum of Variable not equal to sum of its data