Fix shm_size reassign issue