fixed bug in JS compile call