Fix #6281
Merge pull request #6296 from amitmurthy/amitm/shmemfix

Fix #6281