Adding a fix to avoid the history to update data twice. I do not know why
the history is firing the evente twice, this code is to solve that.