fix js snippets