Fix preview window resizing