cherry-pick shmif fix