fix issue in code generation preparation script