Image Source: Getty Images.

Mosaic Company's (NYSE:MOS) second-quarter numbers were a lot worse than I'd expected: The fertilizer maker swung to a loss of $10 million from a profit of $391 million in the year-ago quarter as low fertilizer prices sent sales tumbling. It was one of Mosaic's worst quarters in more than a decade.

But wait... Mosaic's report wasn't all that bad. In fact, the company sprung quite a handful of surprise elements, four of which are highlighted below.

A stronger quarter ahead

While Mosaic's sales volumes for both potash and phosphates were substantially lower in Q2, it is anticipating a much-stronger third quarter.

Data Source: Mosaic financials. Table by author.

As you can see from the table, Mosaic expects to sell much-higher volumes of both nutrients in Q3. The company is largely betting on a strong fall-application season in North America, and even plans to run its phosphate facilities at higher capacity to meet demand. That's a welcome break, as capacity reductions and shutdowns had become the new normal in the fertilizer industry for several quarters.

Ironically though, Mosaic will idle its Colonsay potash mine for the rest of the year. In other words, only the phosphates markets are looking a wee bit positive, while oversupply concerns continue to plague potash markets. That may explain why PotashCorp (NYSE:POT) expects its potash sales volumes for 2016 to be flat, at best, even as Mosaic hopes to hit 5% growth in volumes for phosphates going by the higher end of its guidance range.

Cost-cutting in full swing

I'm pretty impressed by the pace at which Mosaic is cutting down costs during these challenging times. For the second time this year, Mosaic lowered its full-year selling, general, and administrative (SGA) expenses guidance, now expecting to end 2016 with roughly 3% to 9% lower SGA compared to 2015.

In fact, Mosaic has been tightening its belt for several years now, and management is confident of hitting its 2013 goal of cutting down operating expenses by $500 million over five years.

Image Source: Mosaic's Presentation at Bernstein Strategic Decisions Conference, June 2016.

At this point, any move to improve efficiency and lower costs should position Mosaic for stronger growth when the business cycle turns.

Solid cash flows despite losses

Mosaic generated free cash flow worth $382 million in the second quarter despite suffering a loss of $10 million. How is that possible, you may ask? Well, Mosaic received $361 million in advance payments from customers in Brazil during the second quarter, which drove the company's operating and free cash flows significantly higher.

What's important to note here is the uptick in demand from Brazil -- a key agricultural market that's also on Mosaic's priority growth list right now. According to industry reports, Mosaic is already in talks with Brazilian mining giant Vale to buy out its fertilizer business in a deal that could be worth $3 billion. If the deal goes through, it should give Mosaic a solid foothold in a market that's the world's largest producer of sugar and coffee, and second-largest producer of soybeans.

No dividend cut, for now

I'll be brutally honest here: I was expecting Mosaic to follow PotashCorp's footsteps and cut its dividend in line with shrinking profits. Instead, Mosaic management ruled out any such plans in anticipation of improving fertilizer fundamentals going forward. Comparatively, PotashCorp is slashing its quarterly dividend by a whopping 60% after having already lowered it by 34% earlier this year.

While I'm happy to have been proven wrong, I believe Mosaic was largely encouraged by strong cash flows in Q2 to keep its dividend intact. Otherwise, its dividend looks precarious, as it paid out almost 112% of its FCF during the past 12 months.

Remember, this FCF payout ratio would've looked much worse in the absence of Mosaic's exceptionally strong Q2 cash flows. So there's still a chance of a dividend cut in forthcoming quarters if end markets don't improve. For now, investors can continue to enjoy the 3.9% dividend yield that Mosaic stock is offering.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.