Stabilizes the new calulation of time spent on periods
Bugfix in the duration to string method