fixed little bug in history update method