renamed and changed reset_errors