fixed pointer error with union set function