Fix shared memory attach