Fixed some bugs in the header and body