Fix resize event incorrectly binding to document, should be window