Fixed the appearance of the header when resizing window