Fix syntax error for python 3