fixed header bug, some edits