fix JS error