fixed a bug: variable items can not be resolved in saveHistory