Bug fix: time was counted in the wrong direction