Added double counting for performance.