Avoid reloading on JS syntax error