Fix for python3 following gh-1550