fixed python 3 support