Properly filter based on parent_id