Fixes to union loading