fix duration set bug