Fix WriteBeforeRegistredTest