Cillum consequat mattis.

Starbucks recently announced plans to open 3,000 new outlets in the Americas – 1,500 of them in the U.S. – and more in China. That may seem like business as usual for the world’s largest coffeehouse chain, which already has more than 18,000 locations around the globe. But just a few of years ago, Starbucks closed hundreds of stores — and it wasn’t just the burgeoning economic crisis that forced the coffee chain to retrench.

At the time, Starbucks seemed to have lost some of its magic, expanding too rapidly (some would say recklessly) while venturing into questionable new products, beverages, and food items. Starbucks seemed off-course, creating an opening for former CEO Howard Schultz to step back into day-to-day management after an eight-year hiatus and, eventually, revive the brand. Given that history, it’s hard not to wonder if Starbucks’ latest expansion plans – new stores and new products – are just a repeat of past mistakes.

When Howard Schultz returned to run Starbucks in 2008 – he had stepped aside as CEO in 2000 – he inherited a company that had lost its way. Some believed it vulnerable to a takeover. At the time, Starbucks operated about 16,000 stores, having grown at an astonishing pace of 1,300 new stores a year in both 2006 and 2007, according to financial firm Edward Jones. Instead of lauding its coffee, more people seemed to be talking about how many Starbucks stores you could fit in one photo.

As the economy worsened, same-store sales figures fell close to 10% as the company itself seemed to lack focus on the one product that made it successful. Rather than concentrating on coffee, the chain began selling music CDs, breakfast sandwiche,s and frillier and more elaborate drinks alongside other new food items (Strawberries & Creme Frappucino ice cream, anyone?).

But Schultz changed a lot of that. While he didn’t actually get rid of the breakfast sandwich, the recipe was changed so the smell of eggs wouldn’t overwhelm the smell of coffee. He closed down every Starbucks location for three hours on one day to retrain every barista on the art of pulling espresso shots. He upgraded all of store’s espresso machines. Suddenly, it seemed to be all about the coffee again.

Schultz also was forced to close down more stores than he ever thought he would – 900 in all, many of which were in low-performing areas that often competed with, well, another Starbucks down the street.

These moves made Starbucks into one of the true turnaround stories of the last several years. Last month the chain announced fourth quarter revenues of $3.4 billion, up 11% year-on-year. Same-store sales are up in the U.S. and worldwide, and Starbucks shares have risen 10% since fourth-quarter earnings were released.

And now, once again, the chain is expanding – not just locations but the items they sell as well. So it may just seem that Starbucks is retracing its mistakes in the years before Schultz pulled the company back into the black.

This time, however, it does appear that Starbucks has learned some lessons. For one, the chain isn’t growing nearly as fast as it did before the recession. While Starbucks was opening 1,300 new stores a year in the U.S. before 2008, they’re opening closer to 300 a year this time. Edward Jones analyst Jack Russo says Starbucks was opening stores too quickly and too close together, completely misreading how many Starbucks the market could handle. That pace also likely caused problems in properly training the staff (no wonder Schultz shut down stores to retrain baristas).

Plus, while the 3,000 stores it now plans to add may sound like a lot – indeed, those stores would increase Starbucks’ global presence by 13% – the chain is doing it over five years, or about half the pace of its previous expansion.