Fix problems where header appears the wrong height on first load.