fix parsing bug in JS
Whoops, theres 8 line since each train goes two ways
Merge branch 'string-parse-bug'