Fix JS error