A few changes for python3