fixed bug with update event