Fixed the issue of db deleting data