Fix duration calculation inconsistency