remove unnecessary bits in header