Fix sequence number check