Fixed bug in allele frequency calculation