Fix main element issue in IE (closes #25)