fixed dlg_db_sync to match the recent dialog.id table changes