Fixed shared memory creation.