Trying to debug the double counting issue