fix npe that only occurs in IE