Fix bug where total trip distance and duration weren't calculated correctly