Fixed syntax errors preventing JS from running