all but encoding tests fixed