Window resizing now works