sequence number bug fix