fixed custom decorators, added NAME variable to generated functions because jsfunc.name is a readonly variable.