(Includes additional information from earnings conference call, updated stock quotes.)

Morgan Stanley's ( MS) second-quarter numbers look a lot worse than they are.

The bank reported a wider-than-expected loss Wednesday, due to an accounting oddity where improvement in its credit quality actually hurt its results.

The loss of $159 million, or $1.37 per share, was larger than the consensus estimates of 15 analysts polled by Thomson Reuters, who had foreseen a 49-cent loss. Morgan Stanley was also negatively impacted by paying back the federal government's $10 billion investment made through the Troubled Asset Relief Program, or TARP.

It is tempting to slap Morgan Stanley down for the quirks in their numbers. While its competitors Goldman Sachs ( GS) and JPMorgan Chase ( JPM) also took charges related to paying back TARP, they reported big second-quarter gains last week, and had no such debt-related quirks.

But the issue seems to have more to do with the fact that Morgan Stanley came closer to going out of business than Goldman or JPMorgan last year than anything to do with its current performance. CFO Colm Kelleher assured everyone on the company's earnings call Wednesday that Morgan Stanley will no longer be an outlier in this area.

"It's no longer an idiosyncratic issue for Morgan Stanley. We're in line with the pack," he said.

Putting that aside, then, and the fact that Morgan Stanley continues to look like a chump for taking on less risk than Goldman, there are reasons to be optimistic about the company's prospects. Investors agreed Wednesday, bidding the stock up a penny to $27.57 in recent trading.

If you liked this article you might like

China's Banks Halt Business With North Korea Per United Nations Sanctions

Bank Stocks Move Higher as Fed Decides to Start Unwinding Balance Sheet

Bank Stocks Move Higher Ahead of Federal Reserve Meeting

Morgan Stanley Is Using Snapchat to Recruit College Students and Make Them Rich

WeWork Claims Work as a Concept in Suit Against Chinese 'Copycat'