fix join check

Signed-off-by: Mattias Andrée <maandree@operamail.com>
fix intersection check

Signed-off-by: Mattias Andrée <maandree@operamail.com>
union_add

Signed-off-by: Mattias Andrée <maandree@operamail.com>