modify to work for sync_webui