Added resize event handler.