Fixed resizing and centering issues