Added a gap counting verification