Fix NameError in warning string