Fix a really stupid bug with shared memory regions