fixed a NameError