fixing mostly encoding problems (failing/erroring tests)