fixed for python 2