Fixed error when no trains on a route direction are present
Merge branch 'dev' into beta