fixed NameError after upstream update