Fixed some header bugs