Changed counter to idCounter.