fixed a bug in the example js file