Trying to fix counting