Adds the correct type on history edit