Improved union handling part.