fixed mechnet code gen error