JPMorgan Chase, the biggest US bank by assets, said its first-quarter earnings soared, despite revenue falling back slightly.

The bank said it made $6.1 billion in the first quarter, after stripping out payments to preferred shareholders.

That was up 34% from the same time a year ago, when it made $4.6 billion.

Revenue and profit fell in its retail banking business, but increased in investment banking.

JPMorgan said it funded $53 billion in mortgages, a jump of 37% from a year ago. But profits in the mortgage unit fell 31% and the bank said profit margins were lower.

Revenue was $25.8 billion, after stripping out the effect of an accounting charge. That beat analysts' estimates of $25.7 billion, though it was down 3% the same time a year ago.

In many respects, it has been a difficult year for the New York-based bank. A surprise trading loss, which the bank acknowledged about a year ago, has been haunting it, resulting in management shake-ups, increased scrutiny from regulators, scoldings from Congress and a big pay cut for chief executive Jamie Dimon.

In a statement, Dimon said the bank has "work to do" to strengthen internal controls and make sure it is in compliance with regulations. He called it the new "top priority" for the bank.

"There is no room for compromise in meeting our obligations to comply with the new regulatory requirements and ensure that our systems, practices, controls, technology and, above all, culture meet the highest standards," he said.

Last month, the Federal Reserve asked the bank to resubmit its capital plan by the end of September, to address the Fed's concerns about unspecified weaknesses.

JPMorgan said today that it is "dramatically increasing the resources deployed" to address the Fed's concerns, and said it "intends to fully address" the Fed's requirements.

Dimon also said he was "very pleased" with the first-quarter results, and painted a picture of an improving economy.

He said that consumers are "healthier and more confident," noting that bank reduced the amount it set aside to cover bad loans in its retail banking business. He said the bank was seeing signs of a healing economy, including improved housing prices.

One exception Dimon noted, however, was loan demand. Total loans slipped about 4%compared to a year ago, a trend likely to be repeated when the other big banks report their earnings.

"Small businesses remain cautious about the recovery and fiscal uncertainty, and are not investing their capital," Dimon said, though he added that the businesses were "well positioned to invest in growth once they decide to."