Get parent_id correctly