President Obama has announced that all U.S. forces will be withdrawn from Afghanistan by the end of 2016, just before he leaves office. By taking this action, Obama is finally saying “touché” to a military brass that he believed sandbagged him in upping the quantity of forces needed for the troop surge in Afghanistan when he first took office. This time, cleverly, Obama left the number of troops the military wanted—about 10,000 troops—but only for two-and-a-half years and then after that, cut off any possibility of a residual force that could get into trouble there. Thus, Afghanistan will be the second country from which Obama has completely withdrawn U.S. forces recently, Iraq being the first.

Obama should be given credit for these accomplishments, but in both countries, U.S. forces should have been withdrawn much quicker from these losing fiascos. Politically though, as Richard Nixon found out in Vietnam, it is hard for the American public and its political establishment to admit defeat, cut their losses, and bring the long-suffering troops home. It’s a shame that more sons and daughters have to die for a lost cause.

And apparently even some of the troops have been disillusioned with the war effort, for example Sgt. Bowe Bergdahl, the recently released captive of the Taliban. Some of his fellow soldiers allege that he was disenchanted with the U.S. war effort and simply walked off the job. Furthermore, they say that troops were killed trying to find this “deserter.” Yet, if he did willingly desert his post and his fellow soldiers, the U.S. military had to have known this at the time he wandered off and still made the decision to risk men trying to find him in dangerous territory. So in that event, he could be blamed for deserting but not for getting the added U.S. soldiers killed.

Of course, the large issue is whether Bergdahl was right about the war, and he was. Although Osama bin Laden was killed and the main al Qaeda group has been severely degraded in effectiveness, the United States hardly required a 15-year foreign occupation and failed attempt at remodeling Afghanistan to accomplish these goals.

Republican critics of Obama make several valid points when they question the whether his administration should have given up five nasty senior Taliban members to get Bergdahl back. Governments always crow that they don’t negotiate with terrorists, but then do secretly anyway, as shown during even the macho Reagan administration in the 1980s. Reagan demonstrated that paying ransom for the release of hostages—by selling arms to Iran—usually just gets more people taken hostage, the result after his arms sales. In Obama’s prisoner exchange, the swapping of one enlisted man for five Taliban leaders might cause the Taliban, in the remaining two-and-a-half years of the war, to grab other U.S. soldiers and attempt to make more favorable trades. In addition, after one year in Qatar, U.S. troops may again fight these Taliban leaders on the battlefield. Of course, if Obama had simply done the right thing—declaring the war over and beginning an immediate American exit—U.S. forces would not face this problem. Besides, after wars end, prisoners are usually freed on both sides.

Republicans also have a valid point that Obama violated the law by failing to notify Congress 30 days prior to releasing prisoners from Guantanamo prison. (The Obama administration claims that the health and well being of the Bergdahl was such that they had to act more quickly than that.) However, as indicated by their adverse reaction to the prisoner exchange and Obama’s plan to remove all forces from Afghanistan by the end of 2016, many Republicans seem to want to continue this quagmire ad infinitum, wasting even more lives and taxpayer dollars.

The administration apparently hopes that this prisoner exchange will open the door to more general negotiations with the Taliban over the fate of Afghanistan. Good luck on that one, since the Taliban won the war a long time ago and knows it doesn’t need to negotiate.

In sum, the prisoner exchange would be much more acceptable if the United States was ending the war with the Taliban immediately and withdrawing its forces so they wouldn’t have to fight these Taliban leaders again. Obama is doing the right thing by leaving Afghanistan completely, but just not fast enough.