fix the boundries of the trips arrays