more correct railway handling