Fix generated ID issue and other minor bugs in browser example