Why Is The Sum Function Returning 0