model cleanup, fix union error