fixed time for events so that it works with user timezones and fixed some small bugs