fix errors counter