Fixed Python 3 testing issues