fix schedule codegen