fixed bug for packs end with '\x00\x00\x01'