In ten years, Lego has recovered from the brink of bankruptcy to a blockbuster movie and strong sales. Lego Designer Mark Stafford recently took to Reddit to offer some insight on what went wrong in the first place and how the Danish toy company turned it around.

The troubles, he said, involved bad management and expensive and unpopular new products. Stafford explains:

The LEGO company at that stage had no idea how much it cost to manufacture the majority of their bricks, they had no idea how much certain sets made. The most shocking finding was about sets that included the LEGO micro-motor and fiber-optic kits — in both cases it cost LEGO more to source these parts then the whole set was being sold for — everyone of these sets was a massive loss leader and no one actually knew. This was combined with a decision to 'retire' a large number of the LEGO Designers who had created the sets from the late 70's through the 80's and into the 90's and replace them with 30 'innovators' who were the top graduates from the best design colleges around Europe. Unfortunately, though great designers they knew little specifically about toy design and less about LEGO building. The number of parts climbed rapidly from 6000 to over 12,000 causing a nightmare of logistics and storage and a huge amount of infrastructure expansion for no gain in sales. Products like Znap, Primo, Scala and worst; Galidor all came out of this period.

Let's take a closer look at those products that almost led to disaster.

Lego Technic Fiber Optic Multi Set (1996)

The "fiber optics" in this this Technic kit are actually clear plastic tubes that connect to a battery-operated LED-light pack. These specialized parts cost more to produce than the entire set was being sold for.

Znap (1998-99)

The Znap line was an obvious reaction to K'Nex, an American construction toy company that was founded in 1993. Like those of K'Nex, Znap pieces were more elaborate than traditional Lego bricks, and could allow for more architectural creations, like bridges. Ultimately, Znap proved to be an inferior competitor and failed to catch on. To make matters worse, Lego even used those highly unprofitable Technic motors in some of the sets.

Primo (1995-99)

Lego's Duplo line is intended for children 1-5 years old and has been around since 1975 (barring a couple brief absences). The Primo offshoot was intended for babies too young to even play with regular Duplo bricks. And unlike Duplo pieces, they were not compatible with regular Lego pieces. Primo was succeeded by Lego Baby, which was phased out in 2005. The niche market was simply not profitable for the company.

Scala (1979-80, 1997-2001) For some reason, Lego decided to revive an obscure line from '79 targeted at young girls. The one thing that kept the Scala doll line remotely attached to the Lego brand was the use of some bricks in the play sets, and from '97-'98, the brick studs were in flower-shapes incompatible with other Lego sets.

Galidor (2002)

Stafford considers the Galidor line to be Lego's most heinous offense. Based on a kid's show of the same name, the line was basically an action figure series with awkward features like interchangeable arms for characters. Each set in the line featured specialized pieces, which were expensive to produce and in practically no way resembled a Lego product.

Jorgen Vig Knudstorp, a former McKinsey consultant, came in as CEO in 2004 and rescued the company. He tossed series that were wasting money, cut the number of Lego pieces by more than half, and began hiring talented designers who were also passionate fans of the brand (like Stafford), rather than just smart people with impressive degrees.

The company continued to grow the success of the massively popular Bionicle line, as well as licensed series spearheaded by "Star Wars" sets.

Now, designers like Stafford produce successful kits like those in "Legends of Chima," which combine original storytelling with the classic Lego "feel."

For more information on every Lego series — both the good and bad — check out Brickipedia.