fixing a bug causing bus errors with ambiguous nucleotides