Fix a bug where 2nd blink would fail due to js error