Fix JS script issue