Fix bug DNN-5345: get Sys variable in function but not as parameter, it hasn't created when call the script.