fix for python3 support