fixed shared memory offset bug