fixed some of union object bugs.