Fixed error which appears after changing number of errros