Fixed the total time spend calculation issue