Fixed error when parent doesn't exist