Fix #9

set correct scope for js snippets