Bug fix for end time in creating events