bug fix in buildmodel when there are  multiple explainging haplotypes