Fix for JS error