Led by ramped up cost-cutting initiatives and improvement in its consumer banking and credit businesses, Wells Fargo (WFC) revealed a stronger-than-expected 23% improvement in first-quarter profit.

However, sales slumped from the year-earlier period and disappointed expectations, pushing shares of Wells Fargo down 2%.

Revenue for the three-month period ended March 31 was $21.3 billion, down slightly from $21.6 billion a year ago, and short of the Street's view of $21.59 billion. The bank attributed the decline to the absence of the higher-than-average equity gains Wells Fargo recognized last quarter as well as the expected seasonal changes in the mortgage business.

Despite headwinds, the San Francisco-based bank reported record quarterly profit of $5.2 billion, or 92 cents a share, compared with a year-earlier profit of $5.09 billion, or 91 cents, topping average analyst estimates of 88 cents in a Thomson Reuters poll.

Meanwhile, net charge-offs fell to $1.4 billion from $2.4 billion last year in a sign of an improving credit market, while mortgage originations jumped 37% to $52.7 billion as the housing market continued to rebound.

“Loans and deposits demonstrated continued growth in a challenging economic environment,” Wells Fargo CEO John Stumpf said in a statement. “In addition, expenses continued to decline as we improved efficiency across the franchise.”

Part of that streamlining involved reducing headcount over the last year. Wells Fargo ended the first quarter with 255,898 workers, a decrease of 5,271 compared with the prior year.

Follow Jennifer Booton on Twitter at @Jbooton