Fix header and footer animation