Bugfix on shm_update()