Fixed python syntax bug