temporary nasty ord() hack for python3 compat