Fix one cause for segfault for trains w/ midnight departure

It fixes some segfault's but not all.