corrected error that was preventing the elimination of double counting