Some changes for python3