Fixed toParent bug