Last week, drugmaker Rite Aid (NYSE: RAD) reported losses for the 17th straight quarter. But the company managed to deliver at least a little good news, beating the Street's estimates of even greater losses.

Surprised? Let's find out more.

The quarter
Rite Aid reported a net loss of $94.7 million, significantly below the year-ago quarter's $199.3 million loss. The loss per share for the quarter of $0.11 wasn't as bad as the Street's expectations of a $0.17 loss. Revenue during the quarter was $6.27 billion -- a mere 1.8% increase from a year ago but enough to reverse a trend of falling sales in previous quarters.

How did Rite Aid accomplish these improvements? Two words:

Wellness benefits
Rite Aid finally implemented a wellness and customer-loyalty program. This much-needed move encouraged a positive response from customers who had earlier slashed their spending. Rite Aid recorded 44 million members for this program, a 10% increase from the previous quarter. These members accounted for about two-thirds of the company's prescriptions and non-pharmacy sales.

Concerns related to Hurricane Irene also benefited the company, as people stocked up food and batteries. This pushed up same-store sales in August by 2.5%. Although there was a benefit to the reported fiscal quarter, the current quarter that ends in November will take a hit from customers who stay away after the storms.

Needs aid
The third man in what's become a two-man race, Rite Aid is trying really hard to become profitable. It has been closing stores even as rivals Walgreen (NYSE: WAG) and CVS Caremark (NYSE: CVS) have been opening new ones and eating into Rite Aid's market share. Still, Rite Aid is suffering under the burden of an immense debt load at nearly $6 billion, which is more than 6 times the company's market capitalization.

Some credit should be given to the loss-making company, as it reports the third consecutive quarter with improvement in same-store sales growth, which grew by 2.2% for the entire quarter. The company has expanded its immunization program and also launched a wellness-store format that provides an expanded clinical service.

The Foolish bottom line
The company has narrowed its projected loss for the full year and is trying hard to restructure itself. No doubt Rite Aid is improving, but it's still not free from all problems. This looks like a turnaround for this unhealthy drug maker. But I'm not putting a penny in until it shows better numbers. Keep a watch on this company by adding it to My Watchlist.