Fixed the JS error