merge totalsum error fix