many bugs fixed for single train situation