Those crazy kids at BlackBerry managed to surprise the haters on Wall Street by pulling out a profit in their most recent quarter.

Take about 30 seconds to savor that before we get to the punch line: Sales dropped 32 percent to $660 million, missing analysts’ projections.

BlackBerry’s revenue fell to $660 million in Q4, waaaay down from $976 million for the same period a year ago, and under the $786 million that analysts polled by Thomson Reuters had projected. So, yowch.

Thanks to cost cutting, though, the company reported a net profit of $28 million, or 5 cents a share, even though analysts had expected a 4 cents a share loss.

“Our focus this past year was on getting our financial house in order while creating a multiyear growth strategy and investing in our product portfolio. We now have a very good handle on our margins, and our product road maps have been well received,” BlackBerry chief executive John Chen said in a statement. “The second half of our turnaround focuses on stabilization of revenue with sustainable profitability and cash generation.”

BlackBerry is hoping to hang on long enough for a slate of new phones and services to deliver a long-awaited turnaround.