fixed compilation breaking bugs
Adding an update event
And some more on updating event