convert when type is changed