fixed deprecated class ErrorElement