fix destory shm bug