Valeant Pharmaceuticals vrx investors may be feeling a bit of whiplash.

A day after the drug company’s stock price tumbled 12% on reports of a fraud investigation, Valeant’s shares soared about 34% late Tuesday afternoon on a report that the company may sell its gastroenterology drug business Salix. Valeant is in talks to sell Salix, which it only bought last year, to Takeda Pharmaceutical for as much as $10 billion, The Wall Street Journal reported. Valeant later confirmed that it’s “currently in discussions” with potential buyers for Salix as well as other assets.

At that price, Valeant would be selling the business at a loss of more than $1 billion, having paid $11.1 billion to buy Salix ($13.4 billion including debt) in early 2015. “They clearly overpaid,” Evercore ISI analyst Umer Raffat wrote of Valeant’s purchase in a note to clients Tuesday.

Of course, a lot has happened in the roughly 19 months since Valeant struck that deal—notably a series of accounting and drug-pricing scandals that cost the company’s former CEO Michael Pearson his job. The result: Valeant’s shares have sunk 90%, and before Tuesday’s run were worth just $6.2 billion, or $5 billion less than what the company paid for Salix. What’s more, despite potentially losing $1 billion on the Salix round trip transaction, investors now seem more concerned with Valeant’s $30 billion in debt, which has become an increasingly urgent problem. That’s why the market seems to be cheering the sale.

Nonetheless, investors didn’t expect Valeant to ditch Salix. Pearson, as well as his successor and current CEO Joe Papa, promised not to sell any of Valeant’s core assets—which Salix most certainly is. “We’re only considering selling non-core assets,” hedge fund manager Bill Ackman, Valeant board member, and one of its largest shareholders, said in April.

On Valeant’s most recent earnings call in August, Papa reiterated that Valeant considers its core assets to be four distinct drug businesses, including dermatology, eye care (made up of its Bausch & Lomb brand), consumer products, and the Salix GI business. At the time, Papa said Valeant was exploring selling $8 billion worth of other, non-core assets. In other words, selling Salix wasn’t even on the table (nor was Bausch & Lomb, despite investors’ lobbying to divest it).

Divesting Salix, however, is a much quicker fix for several of Valeant’s problems. First, the sale could immediately generate enough money to pay down more of the company’s debt much sooner than Valeant had indicated was possible. Second, it puts a price tag on one of Valeant’s underlying businesses, which should stop the market value of the overall company from continuing to plunge through the floor, anchoring it to what the assets are actually worth (Valeant stock currently trades at about one times book value).

Plus, the Salix business had recently faced some stumbles of its own, including patent disputes as well as plateauing growth in prescriptions of certain GI drugs, forcing Valeant to admit that the unit had disappointed its expectations. Getting rid of Salix means at least one less problem for Valeant to fix, allowing it to focus on righting the rest of its businesses. And it also means that Valeant can at least get most of its money back on an asset whose value has shrunk since Valeant bought it. Although analysts were assigning Salix a standalone value of as much as $14 billion to $15 billion just six months ago, Raffat now thinks Valeant would be lucky to get $10 billion for it, representing a multiple of 12 times its EBITDA, by Raffat’s calculations.

Still, selling off a core asset at a loss shows just how desperate Valeant has become—it knows that investors have little patience left for it after a disastrous year that threatened to put the company out of business entirely. The question Valeant will have to answer now is how it will be able to grow if it no longer owns the engines it was relying on.

Here is Valeant’s full statement about the reports of a potential Salix sale:

In accordance with its duties to shareholders and other stakeholders, management evaluates any transaction relating to core or non-core business units in accordance with the best interest of its shareholders and stakeholders. We are currently in discussions with third parties for various divestitures including but not limited to Salix. The discussions may or may not lead to a definitive agreement. Valeant does not intend to comment further on market speculation or disclose any developments unless and until it otherwise deems further disclosure is appropriate or required.