Bugfixes in the duration to string method and in the time spent method