fixed python syntax errors