fixes previous fix, actually meant to handle case where parent is not in db