increase robustness for js parse