Fixed a unit test bug that failed in IE8