encoding workarounds