debug output bug with py3+