Fix errors class behaviour