fixing the issue with multiple parents