The Air Force has restored to flight status three instructor pilots who were reprimanded and grounded over text messages they sent containing lyrics referencing drug use.

The pilots' careers were nearly ended after investigators found references to "Molly" — also known as the illegal drug "ecstasy" — in text messages on their personal cell phones. The pilots, who are at Laughlin Air Force Base in Texas, said they were referencing songs that mentioned drugs, such as Miley Cyrus' "We Can't Stop."

Lawmakers Rep. Duncan Hunter, R-Calif., and Rep. Adam Kinzinger, R-Ill., took up the cause of the pilots and told Air Force Chief of Staff Gen. Mark Welsh in a Sept. 15 letter that their pop culture references had been "painfully misunderstood by investigators." Welsh promised to look into the case.

In a Wednesday release, the Air Force said Air Education and Training Commander Lt. Gen. Darryl Roberson decided the alleged drug use misconduct "was not sufficiently substantiated by the evidence." Roberson ordered corrective actions be taken regarding those allegations, and the pilots' wings have been returned.

However, Roberson believed there was enough evidence to prove misconduct involving "unprofessional relationships, obstruction of justice, and conduct unbecoming an officer," the release said.

Two of those three pilots, who have not yet been publicly identified, had also been accused of not informing superiors of sexual unprofessional relationships they knew about.

"It is critical that we maintain standards of professional behavior in a training environment," Roberson said. "Notwithstanding the determinations regarding drug use, the reviews made clear that acceptable standards of conduct were not always maintained. We demand all airmen serve with integrity and professionalism and hold airmen whose actions fall short of Air Force standards fully accountable."

In a release, Hunter and Kinzinger applauded the Air Force's decision to restore the pilots' flight status.

"While it's our belief that the initial action taken against the pilots by the Air Force was unjust, we have been impressed with the seriousness and speed by which these cases have been corrected," Hunter and Kinzinger said. "Overall, we are content with the outcome and commend the Air Force for doing the right thing."

Hunter and Kinzinger also commended Welsh for paying attention to the case.

But, they said, they are concerned that the military justice system seems to allow "the unjustified seizure and misrepresentation of personal text messages." They also promised to address that issue.

In a Dec. 10 letter, Hunter pushed Welsh to explain why the Air Force had not moved on those pilots' cases, even though the inspector general investigation and general officer review had both been completed by Nov. 27. The Air Force said at the time that it was still considering the matter.