Fix a problem in the js files