Modify sequence check

Please remove this, it is not related to a generic library.