Changed the add error method to protected