fix a bug in a js file