fix NameError