Adjustments for python3