fix for js error