Fixed encapsulation on errormessage