Minor fixes added for correct duration computations.