Fix func passing from Lua to JS