fix snippets for js