Make the hiding of the header behave properly