fix document deletion in Db