Fix errors component function