Fixed bug in LegendFileReader.