Fix write event