Fixed bug in ancestors.