remove bugs when decide header end.