fix duration variable