Fix NameError after method rename