Fix IE and Chrome bug