fixed problem with py3 compat