fix duration conditions