fix variable undefined issue
update history