Fixes bugs in JSO
Adds problem with closure variables when generating JSO bridge functions