fix "Type mismatch" error in IE8