possible fix for js error