this should prevent some write callbacks to be called twice

Could you please check this.