fix union handling