Fix bad detection of sequences