Some changes in the trips logic