Fix disabling SHM properly