Fix all bugs in unit test from IE7