KB Homes (KBH) reported fewer losses in its second quarter as it built more homes.

The homebuilder reported a $24 million loss, or 31 cents per share, in the three months ending May 31, down from $68 million in losses one year ago. Revenues increased 11% to $302.9 million.

It delivered 1,290 homes during the quarter, up 2% from last year. Deliveries increased 13% in the Central U.S. and 5% in the Southeast.

The average selling price on a home increased 9% to $233,000. Prices jumped 33% on West Coast, the homebuilder said.

The company reported higher profit margins and a $10 million insurance recovery from defected drywall manufactured in China.

Operating losses narrowed to $15.5 million from $57.5 million the year before.

KB said its transition to Nationstar Mortgage (NSM) as its preferred lender proceeded as planned. Nationstar began taking new loan applications from KB homebuyers in May.

"The company expects its alliance with Nationstar to result in improved mortgage origination execution for its homebuyers and, in turn, a more predictable business flow as the transition gains momentum," KB said in its release.