Fix possible Invalid argument on IE