made some changes to fix the issue with JS
made some changes to fix the issue with JS