Code fixed for IE9.