Minor update to db deletion logic