sequence number starts from 0 bug fix