Fixes #4632: Correct computation of pending interval
Merge pull request #475 from ncharles/bug_4632/dev/correct_duration_computation_of_pending_interval

Fixes #4632: Correct computation of pending interval