Fixed header and footer code to remove persistency/floating