Fixed a few issues with union.