Update percentage when resizing the window as well