fix examples in the example page, fix a typo in js