If someone tries to set startYear or endYear (more likely the latter) out of range of the available data, endYear should be updated to be the last year actually available. This is most important in the title of the plots and (presumably) the name of the plots.
This should be easy to fix using the actual start and end date of the data set once it's loaded in.