bugfix on shmem.c
a workaround commit