Fix an undefined variable ref.