President Barack Obama intended to discuss the debt ceiling when he took questions at a town hall event in Maryland Friday, but the first question he got was from an atheist who was concerned about religious discrimination.

"I'm an atheist, and in Zanesville, Ohio in 2008, you asserted that no organization receiving taxpayer funds would be able to discriminate in hiring or firing based on a person's religion," a woman named Amanda told the president. "You have not rescinded this executive order that permits this type of discrimination. In a time of economic hardship when it's difficult for a person to get a job based on her skills, what would you say to a woman who has been denied employment because of her religion or lack of religious beliefs by a taxpayer-funded organization."

"Well, this is a very difficult issue," Obama admitted. "It's very straightforward that people shouldn't be discriminated against for race, gender, sexual orientation, religious affiliation. What is happened is that there has been a carveout dating back to President Clinton's presidency for religious organizations in their hiring for particular purposes, and this is always a tricky part of the First Amendment."

He continued: "Now, I think that the balance we've tried to strike is to say that if you are offering -- if you have set up a nonprofit that is disassociated from your core religious functions and is out there in the public doing all kinds of work, then you have to abide generally with the nondiscrimination hiring practices. If on the other hand, it is closer to your core functions as a synagogue or mosque or a church, then there may more leeway to hire somebody that is a believer of that particular religious faith."

"I think we've struck the right balance so far, but this is something that we continue to be in dialogue with faith-based organizations about to try to make sure that their hiring practices are as open and inclusive as possible."

Watch this video from CNN's Newsroom, broadcast July 22, 2011.