fixing sequence number problem