Added atomic increment decrement to the comparison