Issue 398

Wanted to fix the issue, but also wanted to make the code a little easier to understand
I'll add a note about why I'm not checking seqid (the reason being that if all 4 values were ```None```, then the loop condition would not be satisfied, and we could not have gotten to this point), but I don't think the second ```if``` should be an ```elif```, since by the same logic the entire body of this function should then be put in an ```else``` block (which I strongly prefer not to do, since it does not affect functionality and serves only to indent everything an extra level).