fixed a bug in >3 ancestry