COOK-4544: fixing NameError exception on :delete action