bugs fixed in PythonGenerator