Fix image resizing and centering