It's hard to move past a sexual harassment scandal when your business is in serious trouble.

Barnes & Noble, already reeling from the messy departure of its chief executive, said on Thursday that same-store sales fell 6.1% last quarter compared with a year ago.

The company attributed the decline to a drop in store traffic. Online sales also dropped 14.3% because of fewer promotions, including in Barnes & Noble's Nook tablet business.

Barnes & Noble's overall losses widened to $17 million. The combination led to a sell-off in Barnes & Noble (BKS) stock.

The weak quarter came as other retailers were capitalizing on a healthy consumer economy, and it was another sign of a company in serious trouble.

Barnes & Noble is in the midst of a leadership saga. It is looking to replace its fifth chief executive in as many years.

The bookstore chain fired its latest CEO, Demos Parneros, in early July, citing unspecified violations of company policy. In August, Parneros sued his former employer in federal court for defamation and for firing him without cause.

Parneros alleged that Barnes & Noble was a "financially troubled business" and had let him go a month after a deal to sell the company to an unnamed "book retailer" collapsed. In response, Barnes & Noble said sexual harassment claims and bullying led to Parneros' termination.

"Parneros had not violated company policies, and always conducted himself in a professional manner," the former CEO's lawsuit said.

Barnes & Noble (BKS), which has more than 600 stores in the United States and 23,000 employees, has been trying to trim expenses and grow revenue. But it may not be able to turn the business around.

"We fully realize that cutting expenses does not alone provide a path to the long term viability of any retail business," said Len Riggio, Barnes & Noble's chairman. He pointed to improvement in month-to-month sales as a sign of the company's progress.

On a call with analysts, Riggio said Parneros' lawsuit was "nothing but a smokescreen in an attempt to extort money from the company." Parneros' lawyers did not immediately respond to a request for comment.

Riggio, Barnes & Noble's largest shareholder, built the company into a powerhouse during the 1980s, 1990s and 2000s. He attracted top publishers, authors and book lovers, and opened thousands of stores across the country.

But Barnes & Noble has been in steady decline for years, largely because of the rise of Amazon. Sales have dropped each of the past five years as the company closes stores.

Barnes & Noble's attempts to transform for the digital era by selling Nook tablets fell flat, and its stock price has suffered.

At the same time, smaller bookstores are gaining strength. The American Booksellers Association, a trade group, reported that the number of independent locations rose 6% last year to 2,470.

"Small local bookstores compete by offering community, local expertise, social interaction with experts, book lovers," said Barbara Kahn, a professor of marketing at Wharton.

She called Barnes & Noble "sterile" and said retailers that only offer a wide assortment and low prices, without other distinguishing features, are bait for Amazon.

In June, an investment fund built up a stake in Barnes & Noble to push Riggio to make fundamental changes.

Riggio said the company was "healing" and will begin a search for a new CEO after its annual shareholder meeting in October.

But there are no quick solutions to Barnes & Noble's problems. A new CEO will have to create ways to get more shoppers to buy books off the company's website.

"The company has had, for many, many years, a problem integrating the retail stores and the online business," Riggio said.

Still, he pledged to analysts that Barnes & Noble would strengthen its online business: "We think that some of the customers that we've been bleeding over the past 15 years will begin to come back."

The next CEO will also need to create in-store experiences that make visiting Barnes & Noble more appealing than independent booksellers, and more convenient than buying on Amazon (AMZN).

Timothy Mantel, an executive sharing the CEO duties, said the best way to draw customers to stores was through Barnes & Noble's local book club events.

He argued that a strong upcoming book lineup, including "Fear," Bob Woodward's book about the Trump White House, and Michelle Obama's memoir, "Becoming," will lift the company in the fall and into the holidays.