Fix third byte of AIDEA block output.
Fix Py3 support.