Fixed trail index bug