Fix getEvents to include events with NULL end date

a couple of minor fixes included too