Fix variable name causing a NameError.