fix IEF in kavascript

Fix immediately-executing function.