fix IEF in javascript

Fix immediately-executing function.