fixed issue with duration computation