Fixed some python syntax errors