Duration calculation fix.