Fixed reset issue with max count