fix potential NameError #3