Fixed extractSelectedRoles