fixed JS error