Thus far, it's been a pretty bad year for Motley Fool Stock Advisor selection Gap (NYSE:GPS). After getting the balance sheet back on track and the business on solid footing, this was supposed to be the year that Gap's growth began anew.

It hasn't worked out that way. Same-store sales have been disappointing of late, as were second-quarter earnings. They don't seem to be getting any better, with the company's online stores offline for portions of what already was expected to be a slow quarter.

However, the company is buying back shares. I think it's a smart move, because I believe the stock is undervalued. Too often, companies buy back their stock to mitigate the effects of stock options, or because they believe the current growth will continue -- see Cisco (NASDAQ:CSCO) in 2003 and 2004, for example.

Through the first half of this year, Gap has repurchased approximately 71 million shares at an average cost of $21.14 for a grand total of $1.5 billion. This has reduced the weighted-average diluted share count for the last 12 months by 3.6%. Gap also has another $500 million available for share repurchases, and at prices around $18, I would be surprised if the company isn't busy eating up a large portion of this repurchase authorization.

Gap isn't perfect. The sales trends have been in the wrong direction for a while now, but the business still has a solid balance sheet and is not permanently impaired. Buying back shares now is a sound decision, especially with the stock cheap, the brands still intact, and the potential for growth to return in the future.

Try on some further Foolishness:

Nathan Parmelee has a beneficial interest in shares of Gap but has no financial interest in any of the other companies mentioned. The Motley Fool has an ironclad disclosure policy.