fixed Python3 support