Improve validation of sequence start and end.