fix bug for not showing JS parse error