Fixed some things to be more friendly to IE.