Fixing merging problem. Pay attention to previous use of  GetSeqNum and SetSeqNum. Should have been updated to GetMessageNum and SetMessageNum. --Jingyi