fixed applynode code generation for javascript