corrected shortest duration bug