
162 B.R. 834 (1993)
FARMERS UNION OIL CO., OF ROLLA, NORTH DAKOTA, Plaintiff,
v.
ALLIED PRODUCTS CORPORATION, Defendant.
Civ. No. A2-92-40.
United States District Court, D. North Dakota, Northeastern Division.
April 12, 1993.
*835 *836 John J. Petrik, Pringle & Herigstad, P.C., Minot, ND, for plaintiff.
Robert Schultz, Conmy, Feste, Bossart, Hubbard & Corwin, Ltd., Fargo, ND, Charles Valente, Altheimer & Gray, Chicago, IL, for defendant.

MEMORANDUM AND ORDER
WEBB, Chief Judge.
Before the court is defendant Allied Products Corporation's (Allied) motion to dismiss this action pursuant to Federal Rule of Civil Procedure 12(b)(6). Defendant Allied also filed a motion pursuant to Federal Rule of Civil Procedure 12(b)(3) to dismiss, or alternatively to transfer.

Rule 12(b)(3)
Defendant Allied's Motion to Dismiss, or in the alternative to transfer, filed on November 25, 1993, asserts that plaintiff, Farmers Union Oil of Rolla, North Dakota (Farmers Union), failed to comply with the forum selection clause in the contract by commencing this action in District Court for the District of North Dakota.
In response, plaintiff asserts that defendant's Rule 12(b)(3) motion to dismiss or transfer should be denied because it is procedurally defective. Specifically, defendant's failure to raise the venue challenge in its first responsive pleading, that is, Allied's Motion to Dismiss pursuant to Rule 12(b)(6), filed in July, 1992, precludes the defendant from now raising this defense.
The court agrees that defendant's Motion to Dismiss pursuant to Rule 12(b)(3) of the Federal Rules is procedurally defective. Therefore, defendant's 12(b)(3) motion is DENIED.
Federal Rule of Civil Procedure 12(g) provides:
(g) Consolidation of Defenses in Motion. A party who makes a motion under this rule may join with it any other motions herein provided for and then available to the party. If a party makes a motion under this rule but omits therefrom any defense or objection then available to the party which this rule permits to be raised by motion, the party shall not thereafter make a motion based on the defense or objection so omitted, except a motion as provided in subdivision (h)(2) hereof on any of the grounds there stated (emphasis added).
Federal Rule of Civil Procedure 12(h)(1) provides: "A defense of . . . improper venue . . . is waived (A) if omitted from a motion in the circumstances described in subdivision (g),. . . ." "Any defense that is available at the time of the original motion but is not included, may not be the basis of a second pre-answer motion." 5A C. Wright & A. Miller, Federal Practice and Procedure § 1384 (1990).
The court finds that contractual forum selection provisions are also waived by failure to assert venue objections initially. To grant a change of venue motion subsequent to consideration of a substantive motion to dismiss would thwart the stated policy of delay avoidance, and would result in the unnecessary expenditure of judicial resources. Thus, whether the venue question is raised by statute or contractually, it is waived procedurally.
Transfer motions pursuant to Title 28 United States Code section 1404(a) are within the discretion of the trial court. Section 1404(a) states:
(a) For the convenience of the parties and witnesses, in the interest of justice, a district court may transfer any civil action to any other district or division where it might have been brought (emphasis added).
The court chooses not to exercise its discretion in this manner. Therefore, defendant's Motion for Transfer of this action to Illinois is also DENIED.


*837 Summary Judgment

A Motion to Dismiss which presents matters outside of the pleadings shall be treated as a motion for summary judgment pursuant to Rule 56 of the Federal Rules of Civil Procedure. Abramson v. Mitchell, 459 F.2d 955, 957 (8th Cir.1972).
Rule 56 of the Federal Rules of Civil Procedure "mandates the entry of summary judgment . . . against a party who fails to make a showing sufficient to establish the existence of an element essential to that party's case. . . ." Celotex Corp. v. Catrett, 477 U.S. 317, 322, 106 S.Ct. 2548, 2552, 91 L.Ed.2d 265 (1986). The court must view the facts in the light most favorable to the nonmoving party and give that party the benefit of all reasonable inferences to be drawn from the facts. Kegel v. Runnels, 793 F.2d 924, 926 (8th Cir.1986). Summary judgment is improper if the court finds a genuine issue of material fact; however, the mere existence of some alleged factual dispute will not defeat an otherwise properly supported motion. Vacca v. Viacom Broadcasting of Missouri, Inc., 875 F.2d 1337, 1339 (8th Cir.1989). The issue is whether the evidence submitted presents a sufficient disagreement as to the material facts so that submission to the jury is required, or whether it is so one sided that one party must prevail as a matter of law. Anderson v. Liberty Lobby, Inc., 477 U.S. 242, 251-52, 106 S.Ct. 2505, 2511-12, 91 L.Ed.2d 202 (1986).
"Federal district courts have power to grant summary judgment sua sponte when the losing party is given sufficient advance notice and an adequate opportunity to submit evidence in opposition." Chrysler Credit Corp. v. Cathey, 977 F.2d 447, 449 (8th Cir. 1992) (citing Celotex Corp. v. Catrett, 477 U.S. 317, 326, 106 S.Ct. 2548, 2554, 91 L.Ed.2d 265 (1986); Interco, Inc. v. National Sur. Corp., 900 F.2d 1264, 1269 (8th Cir. 1990)).

Factual Background
Plaintiff Farmers Union is an implement dealer in Rolla, North Dakota. Defendant Allied manufacturers farm machinery through its subsidiary White-New Idea Farm Equipment Company. Until the termination of the dealership agreement between the parties, Farmers Union served as a dealer for Allied.
Prior to serving as a dealer for Allied, plaintiff was a dealer for White Farm Equipment Company (Old White), a Delaware Corporation which declared bankruptcy in 1985. Allied acquired certain assets in the bankruptcy proceeding, including the line of tractors carried by Farmers Union and the right to market the line through a division of Allied.
After acquiring the White Farm assets, Allied executed new dealer agreements with White Farm's dealers, including one with Farmers Union executed on December 16, 1986. Farmers Union terminated its dealer agreement with Allied in 1990. Pursuant to contract[1] and statute[2], Farmers Union attempted *838 to return repair parts listed on the current parts list to Allied. Allied refused to accept approximately $130,000 of parts inventory, taking the position that Allied is obligated to take return of parts only to the extent that it had sold them to the dealer pursuant to the new dealership agreement.
Plaintiff commenced this action in Rollette County District Court, North Dakota, subsequently removed by defendant to this court on March 13, 1992. Plaintiff alleges therein that (1) Defendant Allied agreed to process the cancellation of the dealership agreement in accordance with applicable North Dakota law, and that (2) North Dakota Century Code section 51-07-01 specifically states that wholesaler/manufacturer/distributor shall pay 85% of the current list price on repair parts including superseded parts listed on the current list or catalog plus 5% for shipping and handling to the retailer. Plaintiff further asserts that this requirement applies to successors in interest, that Allied is a successor in interest to Old White, and that because the contract executed in 1986 was in effect at the time of enactment of the successor modification to N.D.C.C. § 51-07-01 and does not have an expiration date, the provisions relating to successor in interest are applicable to defendant.
In support of its Motion to Dismiss, Allied asserts that (1) The order of the Bankruptcy Court provides that Allied shall acquire certain assets of Old White "free and clear of all liens, claims, and encumbrances", which includes parts return obligations; (2) The written contract between the parties provides that plaintiff "has agreed to become a dealer for [Allied] . . . with the express understanding that neither Allied nor White Farm has assumed any liability or obligation whether accrued, obsolete, contingent or otherwise, related to, arising out of or resulting from the former dealer arrangement between Old White and [Farmers Union]"; and (3) Retroactive application of the successor liability portion of N.D.C.C. § 51-07-01, enacted in 1987, is unconstitutional because it impermissibly impairs the parties contract.


*839 Discussion

Defendant Allied asserts that, to the extent that the North Dakota Termination Statute is construed as applicable to the purchaser of assets in a bankruptcy proceeding "despite the express order of the federal Bankruptcy Court," the statute is contrary to the bankruptcy order, and federal bankruptcy law "preempts the state statute and the imposition of successor liability. . . ." Defendant Allied Products Corporation's Brief in Support of Motion to Dismiss, at 5.
" . . . Congress did not intend for the Bankruptcy Code to preempt all state laws. . . ." Midlantic Nat. Bank v. New Jersey Dept. of Environmental Protection, 474 U.S. 494, 505, 106 S.Ct. 755, 761, 88 L.Ed.2d 859 (1986). The Bankruptcy Court order herein does not expressly exclude liability for parts return after termination of a dealership agreement, then existing or arising thereafter. In fact, the bankruptcy sale agreement provides that "[c]onsummation of the Allied transaction will result in the maintenance of WFE's dealer network and customer base." The agreement also states that "[c]onsummation of the proposed transaction will result in the preservation of the value of WFE's existing inventory in the hands of its dealers and consumers." (emphasis added). To the extent that the bankruptcy court order addressed the existing dealership agreements, approval of the acquisition was dependent upon the protection of the existing dealer network. Thus, there is factual reason to refuse to respect the bankruptcy court's order as it pertains to the return of parts subsequent to the termination of the dealership agreement. See Kristy's Inc. and Christianson Farms, Inc. v. Allied Products Corp. and White New-Idea Farm Equipment Co., a Division of Allied Corp., No. A2-89-100, 1991 WL 541160 (D.N.D. June 21, 1991) (The court was bound to recognize the agreement approved by the bankruptcy court because there was no legal or factual reason to refuse to do so. The bankruptcy court order contained an express disclaimer of liability for warranty claims on products sold more than six months prior to the acquisition.).
Neither the Bankruptcy Court nor the parties contemplated the issue of parts return as a liability. See In re Wolverine Radio Co., 930 F.2d 1132, 1147 (6th Cir.1991) (Court found no frustration of federal law by the imposition of successor liability when the interest at issue was not contemplated by the parties at the time of confirmation of the plan.) Therefore, this court concludes that the Bankruptcy Court order absolving Allied of liability of all "liens, claims, and encumbrances" does not preempt the operation of N.D.C.C. § 51-07-01.
Nor does the parties agreement prevent the operation of N.D.C.C. § 51-07-01. Allied cannot insulate itself from liability in contradiction to the stated policy of the statute. "`One whose rights, such as they are, are subject to state restriction, cannot remove them from the power of the State by making a contract about them.'" Energy Reserves Group, Inc. v. Kansas Power & Light Co., 459 U.S. 400, 411, 103 S.Ct. 697, 704, 74 L.Ed.2d 569 (1983) (quoting Hudson County Water Co. v. McCarter, 209 U.S. 349, 357, 28 S.Ct. 529, 531, 52 L.Ed. 828 (1908)). Allied must take the obligations which arise from the operation of the dealership agreements in existence and thereafter affirmed, as well as the benefits. That is, Allied is clearly receiving benefit from their dealers' retention of the parts previously purchased from Allied's predecessor by assisting in the maintenance of effective and efficient service relations. Upon termination, Allied's responsibility to repurchase parts listed on its current parts price list arises, although it may now appear as a liability.
Article I, § 10 of the Constitution provides: "No State shall . . . pass any . . . Law impairing the obligation of Contracts." Defendant claims that retroactive application of N.D.C.C. § 51-07-01, pertaining to successor liability, is an impermissible impairment of contract.
"The threshold inquiry is `whether the state law has, in fact, operated as a substantial impairment of a contractual relationship.'" Energy Reserves Group, Inc. v. Kansas Power & Light Co., 459 U.S. 400, 411, 103 S.Ct. 697, 704, 74 L.Ed.2d 569 (1983) (quoting Allied Structural Steel Co. v. Spannaus, 438 U.S. 234, 244, 98 S.Ct. 2716, 2722, *840 57 L.Ed.2d 727 (1978)). "This inquiry has three components: whether there is a contractual relationship, whether a change in law impairs that contractual relationship, and whether the impairment is substantial." General Motors Corp. v. Romein, ___ U.S. ___, ___, 112 S.Ct. 1105, 1109, 117 L.Ed.2d 328 (1992). The first two are "unproblematic" in most cases. Id. at ___, 112 S.Ct. at 1110. For purposes of this order, the court assumes that the change in the law impairs the contractual relationship between Allied and Farmers Union.[3] Thus, we need determine only the extent of the impairment.
"In determining the extent of the impairment, we are to consider whether the industry the complaining party has entered has been regulated in the past." Energy Reserves Group, Inc. v. Kansas Power & Light Co., 459 U.S. at 411, 103 S.Ct. at 704 (citing Allied Structural Steel Co., 438 U.S. at 242, 98 S.Ct. at 2721 (citations omitted)). If so, the complainant purchased "`subject to further legislation upon the same topic.'" Id., 459 U.S. at 411, 103 S.Ct. at 704 (quoting Veix v. Sixth Ward Bldg. & Loan Ass'n of Newark, N.J., 310 U.S. 32, 38, 60 S.Ct. 792, 795, 84 L.Ed. 1061 (1940)).
According to the statute, Allied, as the successor in interest to Old White, is obligated to take return of parts listed on its current price list, just as Old White was obligated to do previously. The successor is not substantially impaired by having to buy back parts that appear on it own current price list. As noted in the amicus curiae brief submitted on this issue, "[t]he remedy provided is based on current economic circumstances, and not on circumstances that existed prior to the law going into effect." State of North Dakota Amicus Curiae Brief in Support of the Constitutionality of N.D.C.C. § 51-07-01 and the Applicability of North Dakota Case Law to this Case, at 4.
"The purpose of the 1987 amendment to N.D.C.C. § 51-07-01 was to ensure that terminated dealers would receive fair treatment with regard to inventory purchased from one manufacturer and still carried on the price lists and in the catalogs of a successor company or firm." Id. at 11. See also Hearing on SB 2288 Before the Senate Comm. on Industry, Business, and Labor, 50th Sess. (Jan. 27, 1987) ("It protects the dealers investment in parts and wholesale goods in the event of a contract termination between a dealer and a wholesaler for a manufacturer or a distributor. This termination law became effective in 1959." . . . "New companies are taking the legal position that they have no successor liabilities to the dealers. That is the reason for the bill." . . . "There needs to be some way to get these parts back. That was the intent of the original law.").
Assuming arguendo that the statute substantially impairs the contract at issue here, "[i]f the state regulation constitutes a substantial impairment, the State, in justification, must have a significant and legitimate public purpose behind the regulation, such as the remedying of a broad and general social or economic problem." Energy Reserves Group, Inc., 459 U.S. at 411-12, 103 S.Ct. at 704-05 (citing Allied Structural Steel Co., 438 U.S. at 247, 249, 98 S.Ct. at 2724). "[T]he public purpose need not be addressed to an emergency or temporary situation." Id., 459 U.S. at 412, 103 S.Ct. at 705 (citing U.S. Trust Co. of New York v. New Jersey, 431 U.S. 1, 22, 97 S.Ct. 1505, 1517, 52 L.Ed.2d 92 (1977)).
Legislation which impairs obligations of private contracts has been tested by the courts under a rational basis test; whether the legislation is a reasonable means to a legitimate public purpose. U.S. Trust Co. of New York, 431 U.S. at 22-23, 97 S.Ct. at 1517-18; State v. Knoefler, 279 N.W.2d 658, 662 (N.D.1979). The North Dakota Supreme Court has previously determined that "[t]he state has a significant and legitimate interest in providing protection to distributors of vehicles and farm implements because a distributor service is a substantial public need in our economic system. The protection granted to distributors by N.D.C.C. 51-07 is *841 rationally related to the state's interest, . . ." Hall GMC, Inc. v. Crane Carrier Co., 332 N.W.2d 54, 61 (N.D.1983). Additionally, it is undisputed that North Dakota's economy is heavily dependent on agricultural production. Murphy v. Amoco Production Co., 558 F.Supp. 591, 595 (D.C.N.D.1983).
The state's strong interest in protecting distributors, coupled with the conclusion that courts will defer to legislative judgment to determine the appropriateness of the action taken to remedy the societal harm, Energy Reserves Group, Inc., 459 U.S. at 413, 103 S.Ct. at 705, lends itself to the conclusion that North Dakota Century Code section 51-07-01 does not violate the contract clause of the United States Constitution.
Therefore, pursuant to N.D.C.C. § 51-07-01, Allied Products Corporation is obligated to comply with the mandates therein for all repair parts in the possession of Farmers Union Oil Co. which are listed on their (Allied's) current price list or catalog.
Defendant's Motion to Dismiss pursuant to Federal Rule of Procedure 12(b)(6) is DENIED.
The court finds that defendant Allied has received sufficient notice of and an opportunity to present evidence in opposition to, the issues raised by plaintiff's complaint and in defendant's Rule 12(b)(6) motion to dismiss. See Chrysler Credit Corp., 977 F.2d at 449. Therefore, pursuant to the court's ability to grant summary judgment sua sponte, summary judgment is hereby GRANTED to plaintiff Farmers Union Oil Co. of Rolla, North Dakota.
IT IS SO ORDERED.
LET JUDGMENT BE ENTERED ACCORDINGLY.
NOTES
[1]  The dealership agreement of the parties concerning repair parts states, in relevant part:

c. Repair Parts. Upon termination of this contract, White Farm agrees to repurchase and Dealer agrees to sell and to deliver free of all charges and encumbrances to wherever White Farm designates, those parts purchased from White Farm hereunder then on hand unsold, which are in White Farm's opinion new and salable, and which are included in White Farm's current Parts Return List.
[2]  N.D.C.C. § 51-07-01 is the relevant statutory section which provides for the return of repair parts upon the termination of a dealership agreement:

51-07-01. Retail implement or car dealer may recover price of articles upon discontinuance of contract by wholesaler or retail dealer. Whenever any person, firm, or corporation engaged in the business of selling and retailing farm implements and repair parts for farm implements, or in the business of selling and retailing automobiles or trucks, or repair parts for automobiles or trucks, enters into a written contract whereby such retailer agrees to maintain a stock of parts or complete or whole machines, or attachments with any wholesaler, manufacturer, or distributor of farm implements, machinery, attachments, or repair parts, or automobiles, trucks, or repair parts, and either such wholesaler, manufacturer, or distributor or the retailer desires to cancel or discontinue the contract, such wholesaler, manufacturer, or distributor shall pay to such retailer unless the retailer should desire to keep such merchandise, a sum equal to one hundred percent of the net cost of all current unused complete farm implements, machinery, attachments, automobiles, and trucks including transportation charges which have been paid by such retailer, and eighty-five percent of the current net prices on repair parts, including superseded parts listed in current price lists or catalogs which parts had previously been purchased from such wholesaler, manufacturer, or distributor, and held by such retailer on the date of the cancellation or discontinuance of such contract or thereafter received by such retailer from the wholesaler, manufacturer, or distributor. The wholesaler, manufacturer, or distributor shall also pay such retailer a sum equal to five percent of the current net price of all parts returned for the handling, packing, and loading of such parts back to the wholesaler, manufacturer, or distributor. Upon the payment of the sum equal to one hundred percent of the net cost of such farm implements, machinery, attachments, automobiles, and trucks, plus transportation charges which have been paid by the retailer and eighty-five percent of the current net prices on repair parts, plus freight charges which have been paid by the retailer, plus five percent of the current net prices for handling and loading costs on repair parts only, the title to such farm implements, farm machinery, attachments, automobiles, trucks, or repair parts shall pass to the manufacturer, wholesaler, or distributor making such payment, and such manufacturer, wholesaler, or distributor is entitled to the possession of such farm implements, machinery, attachments, automobiles, trucks, or repair parts. All payments required to be made under this section must be made within thirty days after the final settlement between the retailer and the wholesaler, manufacturer, or distributor.
The provisions of this section are supplemental to any agreement between the retailer and the manufacturer, wholesaler, or distributor covering the return of farm implements, machinery, attachments, automobiles, trucks, and repair parts so that the retailer can elect to pursue either his contract remedy or the remedy provided herein, and an election by the retailer to pursue his contract remedy does not bar his right to the remedy provided herein as to those farm implements, machinery, attachments, automobiles, trucks, and repair parts not affected by the contract remedy.
The obligations of any wholesaler, manufacturer, or distributor apply to any successor in interest or assignee of that wholesaler, manufacturer, or distributor. A successor in interest includes any purchaser of assets or stock, any surviving corporation resulting from a merger or liquidation, any receiver, or any trustee of the original wholesaler, manufacturer, or distributor.
The provisions of this section apply to all contracts now in effect which have no expiration date and are a continuing contract, and all other contracts entered into or renewed after June 30, 1987. Any contract in force and effect on July 1, 1987, which by its own terms will terminate on a date subsequent thereto is governed by the law as it existed before July 1, 1987.
[3]  The court is not convinced that there is in fact a change in law. Rather, the current statute may be the codification of the intent of the original drafters; the statute merely clarified the existing successor liability.
