Adding some changes so that things work in IE9