Fix Python3 support