Fix shm crash and update sdb