Fixed bugs releated with python syntax