bugs fixed at PythonGenerator