Fixing off-by-one issue with the slider for next trains