fixed errorClass error on templates