ValueVision Media Inc.’s sales and profit improved in the second quarter, its results showed Wednesday, before accounting for about $5 million in costs for a proxy battle with dissident shareholders who won control of the firm.

The improvement missed analysts’ expectations, however, and the company’s shares were down as much as 47 cents or more than 9 percent in morning trading, but recovered some to close at $4.70 per share, down 6.2 percent.

The Eden Prairie-based cable-TV and online retailer said it lost $4.6 million, or 8 cents a share, in the three months ended Aug. 2. It lost 2 cents a share in the same period a year ago. Excluding one-time costs, ValueVision earned $800,000, or 1 cent a share, in the latest quarter. Analysts had forecast adjusted profit of 3 cents a share.

Revenue was $156.6 million, up 5 percent from a year ago.

The company said it incurred $2.5 million for “activist shareholder response costs” and $2.6 million for CEO transition costs as Mark Bozek took over from Keith Stewart, who tried to fight off dissident shareholders led by the Clinton Group, a New York investment firm. Stewart resigned in late June after the Clinton Group won four spots on the eight-member board.

Bozek said in the company’s earnings release “driving growth will largely be centered around attracting and building a diverse portfolio of proprietary brands and products with the goal of growing our customer base.”

Among Bozek’s initial steps was to establish an office in New York City.

Bozek told analysts on the company’s conference call the New York City office would give the company a more consistent presence in that marketplace. The office would be used to find and attract those new brands and products. “If you want to get hit by lightning,” Bozek told analysts, “you have to stand out in the rain. We plan on standing out in the rain a lot.”