fixed window resizing demo 4