fix a bug about Header init, remove debug info
fix some bug and add comments