Prevent race to increment counter