Fix problems with bad encoding in some classes