fix for JS error