fixed issues with encoding error that only show up for RARE sequences.