Fixed the ancestors bug