fix the javascript error