fix the bug where the JS wouldn't execute