Added callback when window is resized.