try changing this code:
<?php } while ($row_WADApcms2_contenthistory = mysql_fetch_assoc($WADApcms2_contenthistory)); ?>
to:
<?php $RepeatSelectionCounter_1++; ?>
<?php } while ($row_WADApcms2_contenthistory = mysql_fetch_assoc($WADApcms2_contenthistory)); ?>