Fixed bug in js file