fix js error that cause hex crash