Fixed two cryptic bugs related to sequence regions