dpcm: Fix invalid writes