fixes issue #15: entering a value for max events that is less than the
number of events in the SQL results will cause nothing to be rendered.