fixing the js issue