de486684 with moar guard for IE6
(cherry picked from commit 6c29dd24e9786dfd61cdfdb5d21ffcb5694e25ea)