fix bug: LUA ERROR: [string "framework.functions"]:0: bad argument #1 to 'gsub' (string expected, got nil)