Two days after he joked about the FBI's recruitment being hamstrung by the agency's policy on marijuana use, FBI Director James Comey was forced to reassure a Senate panel on Wednesday that he was not, in fact, advocating pot smoking.

On Monday, Comey was discussing the agency's new prioritization of cyber crimes, and he lamented the fact that many applicants with excellent cyber credentials might be dissuaded by the FBI's ban on hiring anyone who's smoked marijuana in the last three years.

"I have to hire a great work force to compete with those cyber criminals and some of those kids want to smoke weed on the way to the interview," Comey said, according to the Wall Street Journal.

Get Breaking News Delivered to Your Inbox

That joke didn't sit well with Sen. Jeff Sessions, R-Ala., who pressed Comey during Wednesday's hearing on whether he was signaling his support for marijuana use.

"Do you understand that that could be interpreted as one more example of leadership in America dismissing the seriousness of marijuana use?" Sessions asked. "And that could undermine our ability to convince young people not to go down a dangerous path?"

Comey reassured the senator that he remains opposed to smoking pot, saying he was "determined" not to lose his sense of humor despite his very serious job.

"I waxed philosophic and funny to say, look, one of our challenges that we face is getting a good workforce at the same time when young people's attitudes about marijuana and our states' attitudes about marijuana are leading more and more of them to try it," said Comey. "I am absolutely dead set against using marijuana. I don't want young people to use marijuana. It's against the law. We have a three-year ban on marijuana. I did not say that I'm going to change that ban. I said I have to grapple with the change in my workforce."

As some states have changed their laws, public opinion has also shifted in recent years toward a more permissive attitude on smoking pot. In January, for the first time, a CBS News poll found a majority of Americans (51 percent) in support of legalizing marijuana for recreational use.

During Wednesday's hearing, Comey also discussed the threat posed by Chinese hackers and other cyber-criminals who steal American business secrets to gain a competitive advantage. He said thwarting those cyber attacks is an "enormous challenge" that the U.S. must continue to meet.

On Monday, the Justice Department announced the first-of-its-kind indictment against five Chinese military hackers who are accused of infiltrating the computer networks of several marquee U.S. companies to steal trade secrets.