Fix bug in railroad generation.