Bugfix: non-declared diff var in JS yields bugs