Fix wrong variable name after refactoring