Fix a bug in such that seq number may overwrite message type