When former Apple (NASDAQ: AAPL) retail chief Ron Johnson took over as CEO of J.C. Penney (JCPN.Q) in June 2011 it was thought he would work the same magic at the struggling retailer that he had for Apple. Instead he committed blunder after blunder and nearly ran the chain into bankruptcy before he was fired and replaced by Myron E. Ullman.

Johnson botched the job so badly that the company brought back a boss that it had once decided was worth replacing. The former-whiz kid from Apple wrecked things in such a grand fashion that "not doing very well" seemed like a great option in comparison with "rapidly going down the toilet."

Now Ullman, whose rehire was seen as a stopgap at best and a desperate hail-Mary at worst, has done the unthinkable and made some money in the fourth quarter (albeit while losing money for the year) and put Penney back on a path toward overall profitability.

"The most challenging parts of the turnaround are behind us," Ullman said in the results release.

J.C. Penney made the right choice
When Ullman was rehired -- probably because nobody else who was qualified wanted to take over the sinking ship Johnson had left behind -- there was much skepticism.

"I think this announcement suggests to us that things are very much in flux at J.C. Penney," Liz Dunn of Macquarie Capital told CNBC at the time of the rehiring. "I don't think they can simply return to the old strategy and all will be well. They've got some big questions to answer, and I think the release sort of hinted at that when Ullman said he's got some work to do to even figure out what's salvageable."

While questions remain, the company's fourth-quarter results give reasons to think that Ullman was an excellent choice who learned from Johnson's mistakes and grew since his first stint as CEO. The encouraging numbers include:

  • Same-store sales up 2% from last year

  • Holiday sales up 3.1% for the November/December period 

  • Sales from jcp.com grew 26.3% for the quarter

  • Generated positive free cash flow of $246 million 

  • Ended year with total available liquidity in excess of $2 billion 

That last one might be the most positive note as Ullman had to scramble to raise $1 billion in September 2013. That offering, while successful, caused problems as some investors accused Ullman of making misleading statements on the day before the offering was announced, according to The New York Post.

Penney said Wednesday that regulators are not pursuing charges in that matter.

How bad off was J. C. Penney?
Johnson had some intriguing ideas that may still pay off, such as Penney's store-within-a-store concept, which has since been co-opted by Best Buy. Other ideas, which included the decision to get rid of sales, were slaps in the face to the brand's longtime customers. 

At the time of Johnson's ousting J.C. Penney had lost money in each of the previous four quarters. In the fiscal year that ended in February 2012, J.C. Penney's revenue was $12.99 billion, which was down 27% from the last full fiscal year before Johnson took over (which ended in February 2011), CNBC reported.

Even hedge fund manager William Ackman, who essentially picked Johnson for the job, thought his tenure was a failure as Ackman told CNBC that Johnson made "big mistakes" and the impact has been "very close to a disaster."

"One of the big mistakes was perhaps too much change too quickly without adequate testing on what the impact would be," Ackman said, as reported by CNBC.

Can Ullman bring J.C. Penney all the way back?
Ullman certainly thinks he can.

"With the most challenging and expensive parts of the turnaround behind us, we will focus on improving gross margin, managing expense, and steadily growing our sales in 2014," he said in the results release. "Our strategic plan seeks to enhance performance across all of the key drivers of our business: merchandising, marketing, store experience, jcp.com, our teams, and our operations. The goal is to deliver consistently improving financial results, and to restore J.C. Penney as a leader in American retail."

While what Ullman has done is impressive -- specifically the rise in online sales -- an improved year and a good quarter do not guarantee future success. Ullman 2.0 has proven that his strengths from the first CEO stint, which include his ability to mange inventory and supply lines and his willingness to learn, adapt, and evolve the company, give him a fighting chance.

J.C. Penney may be on better footing but it still faces the same bricks-and-mortar and online competitors that it did under Johnson. To return to actual full-year profitability, Ullman must continue to balance careful fiscal management with finding ways to grow the audience for J.C. Penney. Those are daunting tasks but not as daunting as the ones that he has already completed.