Quick fix to getParent method