Fix a problem in JavaScript snippets.