I think it eorks because you define `errorElement` a few lines below