small correction on duration calculation