bugfix on add_repeat_errcount