fix js error in console