fixing error on js file