[minor] fixed counter condition