Fix for IE incorrect behavior