Fixed total being returned twice