Resolve an issue when resizing the browser