Fixed bug in updateEvent