fix #67, we would reset tripIndex to pre-defined one when onEnd
Merge pull request #70 from EragonJ/bug/67

fix #67, we would reset tripIndex to pre-defined one when onEnd