Register output glitches and memory writes

If write enable, we, was 1, i.e. I was writing something into memory, and now I want to set it to 0, on the clock’s positive edge I will get a glitch on we signal for the duration of register’s $ t_{pd}$ . The result is, my memory will be corrupted. Something will be written while we is glitching.

What am I missing? How is this handled?