Fix duration check