fixed a bug because of changes to getParent in DataService class