Fix py3.3 TypeError