Fixing issue with IE 8 innerHTML