fix regression due to python 3 change of syntax