Changed the way NameErrors are handled.