Fixed some bugs for adding and editing events