Wells Fargo (WFC) posted a 22% increase in third-quarter profit that topped Wall Street expectations on Friday as mortgage lending picked up and the bank continued to distance itself from problem assets.

The fourth-largest U.S. bank posted net income of $4.9 billion, or 88 cents a share, compared with a year-earlier profit of $4.06 billion, or 72 cents, topping average analyst estimates in a Thomson Reuters poll by a penny.

Revenue for the three-month period was $21.2 billion, down slightly from $21.3 billion a year ago, missing the Street’s view of $21.45 billion.

Shares of San Francisco-based Wells Fargo fell more than 3.3% to $34.01.

Wells Fargo, the largest U.S. home lender, said mortgage-banking revenue climbed more than 50% year-over-year to $2.8 billion and would have been nearly $200 million higher if it had not held on to some loans ready for sale.

However, mortgage revenues were down about $86 million from the prior quarter.

“While the economic and interest rate environments continue to present challenges for us and our industry, our diversified model and focus on our customers continued to produce strong quarterly results,” Chief Financial Officer Tim Sloan said in a statement.

From last quarter, Wells Fargo said total average core checking and savings deposits jumped by $16.9 billion, while total loans grew by $7.4 billion to $782.6 billion.

The company said its credit quality improved during the third quarter, which was helped by a rebounding housing market and Wells Fargo’s continued distancing from problem assets.

Follow Jennifer Booton on Twitter at @Jbooton