To fix it, fetch roles and privileges separately or combine them with UNION to avoid multiplying rows.
UNION