fixed the indexing error for all haplotype methods