Fix some ancestry functions