fixed trip index issue