py2/3 bug fix.