save type and duration correctly in DATA object. show values correctly in the modal dialog.