Lantern Entertainment and The Weinstein Co. have resolved the two biggest remaining issues of the sale of the scandal-ravaged company: final price and closing date.

The two entities announced they have reached a deal with the unsecured creditors committee, settling on a purchase price of $21 million (down from a previous level of $23 million). The sale is expected to close on July 13, following a scheduled bankruptcy court hearing scheduled for 10AM ET on July 11.

Under the terms of the resolution, Lantern agreed to make numerous cure payments for contracts it is assuming in the sale, a key issue for unsecured creditors. A lengthy, risky courtroom fight would have been the only alternative.

“We are delighted that today’s agreement clears the path for this sale to close. Lantern represents the highest and best value to creditors after the competitive bidding process,” said Robert Del Genio, Chief Restructuring Officer of The Weinstein Co. “We thank Lantern and the UCC for their constructive approach to achieving deal certainty.”

Related Story VidAngel Settles 4-Year Battle With Disney And Warner Bros, Agreeing To Pay $9.9M To Emerge From Bankruptcy

Lantern Entertainment Co-Presidents Andy Mitchell and Milos Brajovic issued a joint statement. “This collective resolution affirms our commitment to closing the transaction,” they said. “This significant milestone is a very productive and positive step, and we are grateful to be part of the solution.”

Determining the fate of the Weinstein Co. has been an arduous, up-and-down process. The company has faced a mountain of issues since the unraveling of Harvey Weinstein began last October. As the co-founder faced accusations of sexual assault and harassment from dozens of women, the company’s already precarious financial state quickly became untenable. Even after Lantern was determined to be the lone bidder for the Weinstein assets, the specter of liquidation loomed over the bankruptcy process, an outcome that would have been much worse for creditors.

“Lantern has been steadfast in its dedication to consummate this sale as a going concern, with our employees and assets as the core of its business and with Lantern’s commitment to diversity and respect for all,” said the Board of Representatives of The Weinstein Company. “We wish Lantern all the best as they embark on the exciting challenge of revitalizing these valuable assets.”