fixed the js script to go to main app