fix bugs in api updater