Bad habits are hard to break. And as recent, troubling revelations have reminded the U.S. public, that maxim seems particularly applicable to federal agencies.

So it was encouraging to learn Wednesday that the Transportation Security Administration has corrected a serious misjudgment.

TSA Administrator John Pistole had announced in early March that small knives, and some sporting equipment containing sharp blades, would be allowed in carry-on luggage on airliners.

That change, set for late April, was delayed after a justified storm of protest.

And on Wednesday, citing “extensive engagement” with assorted concerned parties, including law enforcement officials and passenger advocates, Mr. Pistole said the TSA’s list of prohibited items would remain unaltered.

Among those who had rightly objected to knives in carry-ons: the Federal Law Enforcement Association, the Coalition of Flight Attendant Unions, family members of 9/11 victims and numerous federal lawmakers.

Mr. Pistole told The Associated Press: “After getting the input from all these different constituents, I realized there was not across-the-board support that would serve us well in moving forward. It is a recognition that, yes, these items could be used as weapons, but I want our folks to focus on those things that, again, are the most concern given the current intelligence.”

Rep. Bennie Thompson of Mississippi, the ranking Democrat on the House Homeland Security Committee, hailed Mr. Pistole’s decision: “When established processes for creating policy are followed, common sense prevails.”

And when the 9/11 hijackers took over those airplanes, they did so with knives and box-cutters. Thus, anyone, and especially the TSA director, should have known that allowing even small knives in carry-on bags on airliners was a dangerous notion.

Meanwhile, it’s likely no coincidence that he announced that he was dropping that notion on the day that the House was debating the TSA budget.

Still, as Rep. Ed Markey, D-Mass., pointed out, Mr. Pistole did hear out those who opposed the change he wanted — and did have “the courage to change course.”

Many Americans get aggravated, all too often with ample reason, with the TSA.

But in this case, the agency got something right — after getting it wrong.