Added saving previous variable.