Fix some bugs

Fix some bugs in header and footer