fix bugs in trusted credential syncing