Fixed issue with getAttribute not existing in IE.