Fix IE8 error on window resizing
Merge pull request #1301 from chemerisuk/master

Fix IE8 error on window resizing