Fixed bug: trains are not proceeded on the last interval.