fix bug of Error: attempt to apply non-function by add .GlobalEnv to global variable