removed warnings and fixed a bug for seq number > 127